package com.ruoyi.channelApi;

import com.ruoyi.channelApi.domain.CfCrmRequest;
import com.ruoyi.channelApi.domain.ChannelRequest;
import com.ruoyi.channelApi.domain.TelRequest;
import com.ruoyi.channelApi.service.ChannelApiService;
import java.util.Map;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequiredArgsConstructor
@RestController
@RequestMapping("/api/channelInfo")
public class ChannelApiController {

    private final ChannelApiService channelApiService;


    @PostMapping("/pushCrmInfo")
    public Map<String, Object> saveCrmData(@RequestBody ChannelRequest channelRequest) {
        return channelApiService.saveChannelPushCrm(channelRequest);
    }

    @PostMapping("/telCheck")
    public Map<String, Object> telCheck(@RequestBody TelRequest telRequest) {
        return channelApiService.telCheck(telRequest);
    }

    @PostMapping("/cf_crm")
    public Map<String, Object> cfCrm(CfCrmRequest crmRequest) {
        return channelApiService.cfCrm(crmRequest);
    }


}
